home *** CD-ROM | disk | FTP | other *** search
/ Visual Basic Source Code / Visual Basic Source Code.iso / vbsource / screen / setup.frm < prev    next >
Text File  |  1994-11-28  |  7KB  |  231 lines

  1. VERSION 2.00
  2. Begin Form frmSetup 
  3.    BackColor       =   &H00FFFFFF&
  4.    BorderStyle     =   3  'Fixed Double
  5.    ClientHeight    =   4080
  6.    ClientLeft      =   1980
  7.    ClientTop       =   1830
  8.    ClientWidth     =   4380
  9.    Height          =   4485
  10.    Icon            =   SETUP.FRX:0000
  11.    Left            =   1920
  12.    LinkTopic       =   "Form1"
  13.    MaxButton       =   0   'False
  14.    MinButton       =   0   'False
  15.    ScaleHeight     =   4080
  16.    ScaleWidth      =   4380
  17.    Top             =   1485
  18.    Width           =   4500
  19.    Begin Frame fraOptions 
  20.       Height          =   495
  21.       Left            =   120
  22.       TabIndex        =   7
  23.       Top             =   3120
  24.       Width           =   4155
  25.       Begin CheckBox chkMMove 
  26.          Caption         =   "Moving mouse will not disable screen saver"
  27.          Height          =   315
  28.          Left            =   120
  29.          TabIndex        =   5
  30.          Top             =   120
  31.          Width           =   3975
  32.       End
  33.    End
  34.    Begin Frame fraAuthor 
  35.       Caption         =   "Author"
  36.       Height          =   1275
  37.       Left            =   720
  38.       TabIndex        =   12
  39.       Top             =   0
  40.       Width           =   2475
  41.       Begin Label lblVersion 
  42.          Caption         =   "Version x.x"
  43.          Height          =   255
  44.          Left            =   120
  45.          TabIndex        =   14
  46.          Top             =   900
  47.          Width           =   2295
  48.       End
  49.       Begin Label lblAuthor 
  50.          BackColor       =   &H00FFFFFF&
  51.          Caption         =   "Rob McIntosh.     Comments to 100413,1342 on Compuserve"
  52.          Height          =   615
  53.          Left            =   120
  54.          TabIndex        =   13
  55.          Top             =   300
  56.          Width           =   2295
  57.       End
  58.    End
  59.    Begin Frame fraPassword 
  60.       Caption         =   "Password"
  61.       Height          =   735
  62.       Left            =   120
  63.       TabIndex        =   11
  64.       Top             =   2340
  65.       Width           =   4155
  66.       Begin CommandButton cmdPassword 
  67.          Caption         =   "Set Password..."
  68.          Enabled         =   0   'False
  69.          Height          =   315
  70.          Left            =   2340
  71.          TabIndex        =   4
  72.          Top             =   240
  73.          Width           =   1695
  74.       End
  75.       Begin CheckBox chkPassword 
  76.          Caption         =   "Password Protected"
  77.          Height          =   315
  78.          Left            =   120
  79.          TabIndex        =   3
  80.          Top             =   240
  81.          Width           =   2175
  82.       End
  83.    End
  84.    Begin Frame fraSpeed 
  85.       Caption         =   "Speed"
  86.       Height          =   855
  87.       Left            =   120
  88.       TabIndex        =   9
  89.       Top             =   1440
  90.       Width           =   4155
  91.       Begin HScrollBar hsbSpeed 
  92.          Height          =   255
  93.          LargeChange     =   50
  94.          Left            =   120
  95.          Max             =   500
  96.          SmallChange     =   10
  97.          TabIndex        =   2
  98.          Top             =   300
  99.          Width           =   3915
  100.       End
  101.       Begin Label Label5 
  102.          Alignment       =   1  'Right Justify
  103.          Caption         =   "Fast"
  104.          Height          =   195
  105.          Left            =   3600
  106.          TabIndex        =   10
  107.          Top             =   600
  108.          Width           =   435
  109.       End
  110.       Begin Label Label6 
  111.          Caption         =   "Slow"
  112.          Height          =   195
  113.          Left            =   120
  114.          TabIndex        =   6
  115.          Top             =   600
  116.          Width           =   495
  117.       End
  118.    End
  119.    Begin CommandButton cmdCancel 
  120.       Cancel          =   -1  'True
  121.       Caption         =   "Cancel"
  122.       Height          =   315
  123.       Left            =   3300
  124.       TabIndex        =   1
  125.       Top             =   960
  126.       Width           =   975
  127.    End
  128.    Begin CommandButton cmdOK 
  129.       BackColor       =   &H00FFFFFF&
  130.       Caption         =   "OK"
  131.       Default         =   -1  'True
  132.       Height          =   315
  133.       Left            =   3300
  134.       TabIndex        =   0
  135.       Top             =   540
  136.       Width           =   975
  137.    End
  138.    Begin Image imgIcon 
  139.       Enabled         =   0   'False
  140.       Height          =   480
  141.       Left            =   120
  142.       Top             =   300
  143.       Width           =   480
  144.    End
  145.    Begin Line Line2 
  146.       BorderWidth     =   2
  147.       X1              =   120
  148.       X2              =   4260
  149.       Y1              =   3720
  150.       Y2              =   3720
  151.    End
  152.    Begin Line Line1 
  153.       BorderWidth     =   2
  154.       X1              =   120
  155.       X2              =   4260
  156.       Y1              =   1380
  157.       Y2              =   1380
  158.    End
  159.    Begin Label Label3 
  160.       BackColor       =   &H00FFFFFF&
  161.       Caption         =   "This Screen Saver is Freeware."
  162.       Height          =   195
  163.       Left            =   120
  164.       TabIndex        =   8
  165.       Top             =   3780
  166.       Width           =   2715
  167.    End
  168. End
  169. Option Explicit
  170.  
  171. Sub chkPassword_Click ()
  172.     If chkPassword.Value Then
  173.         cmdPassword.Enabled = True
  174.     Else
  175.         cmdPassword.Enabled = False
  176.     End If
  177. End Sub
  178.  
  179. Sub cmdCancel_Click ()
  180.  
  181.     Unload Me
  182.  
  183. End Sub
  184.  
  185. Sub cmdOK_Click ()
  186.     
  187. Dim putback As String
  188.     
  189.     'Save Everything back to the control.ini file
  190.  
  191.     If chkMMove.Value <> -1 * MouseMove Then
  192.         putback = Format$(chkMMove.Value)
  193.         Call PutIni(iniName, iniSection, "MouseMove", putback)
  194.     End If
  195.     If hsbSpeed.Value <> SpinSpeed Then
  196.         putback = Format$(hsbSpeed.Value)
  197.         Call PutIni(iniName, iniSection, "SpinSpeed", putback)
  198.     End If
  199.     If chkPassword.Value <> PWprotected Then
  200.         putback = Format$(chkPassword.Value)
  201.         PWprotected = chkPassword.Value
  202.         Call PutIni(iniName, iniSection, "PWprotected", putback)
  203.     End If
  204.     Unload Me
  205.  
  206. End Sub
  207.  
  208. Sub cmdPassword_Click ()
  209.     
  210.     'Show the password form
  211.     frmPassword.Show 1
  212.  
  213. End Sub
  214.  
  215. Sub Form_Load ()
  216.  
  217.     caption = SaverName & " Settings"
  218.     CentreForm Me
  219.     ' Get the picture from the icon
  220.     imgIcon.Picture = Me.icon
  221.     chkMMove.Value = -1 * MouseMove
  222.     hsbSpeed.Value = SpinSpeed
  223.     lblVersion = VERSION
  224.     If PWprotected Then
  225.         chkPassword.Value = 1
  226.     Else
  227.         chkPassword.Value = 0
  228.     End If
  229. End Sub
  230.  
  231.